Skip to content

ipc4: helper: remove false warning#10605

Open
wjablon1 wants to merge 1 commit intothesofproject:mainfrom
wjablon1:ipc4_wrn_fix
Open

ipc4: helper: remove false warning#10605
wjablon1 wants to merge 1 commit intothesofproject:mainfrom
wjablon1:ipc4_wrn_fix

Conversation

@wjablon1
Copy link
Contributor

@wjablon1 wjablon1 commented Mar 6, 2026

Function get_driver is once called just for checking if a component is already registered prior to registration. This leads to a false warning. This change fixes this by adding a separate function that does not issue the warning.

@softwarecki
Copy link
Collaborator

Nice fix. The previous behavior was indeed confusing because the warning appeared in the logs before the firmware actually checked whether the module was in the loadable set.

Copilot AI review requested due to automatic review settings March 6, 2026 15:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes a false warning emitted when checking whether an IPC4 component driver is already registered, by splitting the lookup into a non-logging search helper and a logging wrapper.

Changes:

  • Refactored driver lookup into ipc4_search_for_drv() (no warning) and ipc4_get_drv() (warns if not found).
  • Updated the “already registered components” check to use the non-logging search helper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 1233 to 1235
/* Check already registered components */
drv = ipc4_get_drv(&mod->uuid);
drv = ipc4_search_for_drv(&mod->uuid);

Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ipc4_get_comp_drv() now uses ipc4_search_for_drv() for the initial lookup unconditionally. When CONFIG_LIBRARY_MANAGER is disabled (or for non-loadable/base modules where no registration attempt follows), a missing driver will now fail silently because ipc4_get_comp_drv()/comp_new_ipc4() return NULL without logging. Consider using ipc4_search_for_drv() only in the pre-registration check under #if CONFIG_LIBRARY_MANAGER, and keep ipc4_get_drv() (or add an explicit tr_err/tr_warn) for the non-library-manager path so missing base drivers still produce a diagnostic.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will fix

Function get_driver is once called just for checking if a component is
already registered prior to registration. This leads to a false warning.
This change fixes this by adding a separate function that does not issue
the warning.

Signed-off-by: Wojciech Jablonski <wojciech.jablonski@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants